<script setup>
import { ref } from 'vue'
const isvisible = ref(false)
const changeState = () => {
  isvisible.value = !isvisible.value
}
</script>
<template>
  <div v-show="isvisible" style="max-width: 600px">
    <el-alert closable="false" title="弹窗" type="success" effect="dark" />
  </div>
  <div>
    <el-button @click="changeState">点击弹窗</el-button>
  </div>
</template>

<style scoped>
.el-alert {
  margin: 20px 0 0;
}
.el-alert:first-child {
  margin: 0;
}
</style>
